package com.lkl.feign;

import com.lkl.entity.Book;
import com.lkl.feign.fallback.BookFallbackFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "service-book", fallback = BookFallbackFeignClient.class)
public interface BookFeignClient {

    @RequestMapping("/book/{bid}")
    Book findBookById(@PathVariable("bid") int bid);
}
